<template>
  <el-container style="height: 100%; border: 1px solid #eee">
    <el-aside width="aside_width" style="background-color: rgb(238, 241, 246);height: 100%;margin-left: -1px;">
      <Aside :isCollapse="isCollapse"></Aside>
    </el-aside>

    <el-container style="height: 100%;">
      <el-header style="text-align: right; font-size: 12px;height: 100%;border-bottom: #bfb8b8 2px solid;">
        <Header @doCollapse="doCollapse"></Header>
      </el-header>

      <el-main style="height: 100%;">
<!--        <Main></Main>-->
            <router-view/>
      </el-main>
    </el-container>
  </el-container>

</template>

<script>
import Aside from "@/components/Aside";
import Header from "@/components/Header";
// import Main from "@/components/Main";
export default {
  name: "Index",
  components: {Header, Aside},
  data(){
    return {
      isCollapse:false,
      aside_width:'200px'
    }
  },
  methods:{
    doCollapse(){
      console.log('111')
      this.isCollapse = !this.isCollapse
      if (!this.isCollapse){
        this.aside_width='200px'

      }else
      {
        this.aside_width='64px'

      }

    }
  }





}
</script>

<style scoped>

.el-main{
  padding: 5px;
}
.el-aside {
  color: #333;
}

</style>